package site.teamo.biu.net.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import site.teamo.biu.net.common.constant.YesOrNo;
import site.teamo.biu.net.server.entity.ClientDO;
import site.teamo.biu.net.server.pojo.dto.ClientDTO;

import java.util.List;

/**
 * @author haocongshun
 * @date 2023/03/06 15:26:37
 */
public interface ClientManagementService extends IService<ClientDO> {


    List<ClientDTO> queryClientList();

    ClientDTO queryClientByToken(String token);

    /**
     * 创建客户端
     *
     * @param clientId 客户端id
     * @return 接入token
     */
    String createClient(String clientId,String name);

    String regenerateToken(String clientId);

    Boolean deleteClient(String clientId);

    void onHeartbeat(String token);

    YesOrNo isExist(String token);

    YesOrNo isOnline(String token);
}
